package com.rpc.config;

import com.rpc.handler.NettyServiceHandler;
import com.rpc.handler.RpcClientHandler;
import com.rpc.handler.RpcServiceHandler;
import com.rpc.spring.SpringBeanPostProcessor;
import com.rpc.spring.SpringContextApplication;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RpcConfiguration {
    Logger logger = LoggerFactory.getLogger(getClass());
    {
        logger.info("rpc注解扫描器启动");
    }
    @Bean
    public SpringBeanPostProcessor springBeanPostProcessor(){
        return new SpringBeanPostProcessor();
    }
    @Bean
    public SpringContextApplication springContextUtil(){
        return new SpringContextApplication();
    }

    @Bean
    public RpcServiceHandler rpcServiceHandler(){
        return new RpcServiceHandler();
    }

    @Bean
    public NettyServiceHandler nettyServiceHandler(){
        return new NettyServiceHandler();
    }
    @Bean
    public RpcClientHandler rpcClientHandler(){
        return new RpcClientHandler();
    }


}
